#pip install cntext -i https://pypi.douban.com/simple/
#pip uninstall numpy
#pip install numpy -i https://pypi.douban.com/simple/
import cntext as ct
text = '''

'''

r = ct.sentiment(text=text,
             diction=ct.load_pkl_dict('DUTIR.pkl')['DUTIR'],
             lang='chinese')
             

           
             
             
positive=r['乐_num']+r['好_num']
negative=r['怒_num']+r['哀_num']+r['惧_num']+r['恶_num']+r['惊_num']
sentiment=1
if positive-negative>0:
    sentiment=0
elif  positive-negative<0:
    sentiment=2
print(sentiment)
